package com.snailthink.controller;

import com.snailthink.util.JsonUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/json2")
public class JsonController2 {

    @RequestMapping("/t1")
    public String getRestController() {
        return "AAA";
    }

    @GetMapping("/getRestTest2")
    public String getRestTest2() {
        return "getRestTest2";
    }

    @GetMapping("/getRestTest3")
    public String getRestTest3() {
        Date date=new Date();
        return JsonUtils.getJosn(date,"yyyy-MM-dd HH:mm:ss");
    }
}
